package com.company.project.service.impl;

import com.company.project.pojo.permission.Permission;
import com.company.project.mapper.PermissionMapper;
import com.company.project.pojo.permission.PermissionDTO;
import com.company.project.service.IPermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 任建波
 * @since 2019-08-10
 */
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements IPermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    /**
    *根据role_id查询权限
     */
    @Override
    public List<PermissionDTO> getPermissionListByRoleId(Integer roleId) {
        List<PermissionDTO> permissionDTOList = permissionMapper.getPermissionListByRoleId(roleId);
        return permissionDTOList;
    }
}
